<?php namespace Api\Controllers;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB as DB;
use Entry\User;
use Api\Models\Post;
class PostController extends Controller
{
    protected static $name = "post";
    protected static $verbose_name = "post文章";
    protected static $permissions = [];
    private function post(){
        $obj = collect();
        for($i=1;$i<=50;$i++){
            $arr = ['id'=>$i,'title'=>'title'.$i,'body'=>'content'.$i,'user_id'=>1];
            $obj->push($arr);
        }
        return $obj;
    }
    public function index()
    {
        $obj = $this->post();
        return $obj;
    }
    public function show($id){
        $obj = $this->post();
        return $obj->where("id",intval($id))->first();
    }




}